package demo4;

import java.util.Iterator;
import java.util.LinkedList;

public class QQhome {
    public static void main(String[] args) {
        String[]strs={"12345","67891","12347809933","98765432102","67891","12347809933","67891"};
        for (int i = 0; i <strs.length ; i++) {
            for (int j = i+1; j <strs.length ; j++) {
                if (strs[i]!=null&&strs[i].equals(strs[j])){
                    strs[j]=null;
                }
            }
        }
        LinkedList list=new LinkedList();
        for (String s:strs) {
            if (s!=null){
                list.add(s);
            }
        }
        for (Object o : list) {
            System.out.println(o);
        }
        System.out.println("***********************");
        Iterator it=list.iterator();
        while (it.hasNext()){
            String qq=(String)it.next();
            System.out.println(qq);
        }



    }
}
